package xyz.erupt.flow.service;

import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import xyz.erupt.flow.bean.entity.OaWorkFlowGroup;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

@Validated
public interface WorkFlowGroupService {

    List<OaWorkFlowGroup> getGroups(String keyword);

    @Transactional(rollbackFor = Exception.class)
    void GroupsSort(@NotNull List<Long> groups);

    @Transactional(rollbackFor = Exception.class)
    void updateGroupName(@NotNull Long id,@NotBlank String name);

    @Transactional(rollbackFor = Exception.class)
    void createGroup(@NotBlank String name);

    @Transactional(rollbackFor = Exception.class)
    void deleteGroup(@NotNull Long id);

}
